package com.xinsoft.entity.dto;

import com.xinsoft.constant.Const;
import com.xinsoft.entity.po.SysDictionary;
import com.xinsoft.entity.po.SysMaterial;
import lombok.Data;

import java.io.Serializable;

/**
 *  @author: π
 *  单位
 */
@Data
public class KisUnitDto implements Serializable {
    private Integer   FMeasureUnitId;      //内码
    private String   FUnitGroupID;        //组名
    private String   FUnitGroupID_FName;  //组名
    private String   FNumber;             //代码
    private String   FName;            //名称
    private String   FCoefficient;     //系数
    private String   FStandard;        //是否默认单位
    private String   FAuxClass;        //类别
    private String   FConversation;    //换算方式
    private String   FPrecision;       //精度
    private String   FNameEN;          //英文名称
    private String   FNameENPlu;       //英文复数

    public static SysDictionary voToPo(KisUnitDto vo) {
        if (vo == null) {
            return null;
        }
        SysDictionary sysDictionary = new SysDictionary();
        sysDictionary.setDictionaryTypeId(1);
        sysDictionary.setDicName(vo.getFName());
        sysDictionary.setKis_unit_id(vo.getFMeasureUnitId());
        sysDictionary.setDoDelete(0);
        return sysDictionary;
    }
}
